<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    class Father {
        constructor(fatherName) {
            this.fatherName = fatherName;
        }
        say() {
            console.log('Father' + this.fatherName);
        }
    }

    class Son extends Father {
        constructor(fatherName, sonName) {
            super(fatherName);
            this.sonName = sonName;
        }
        say() {
            super.say();
            console.log('Son' + this.sonName);
        }
    }
    let son = new Son('father', 'son');
    son.say();
</script>

</html>